<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>车辆配置</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" type="text/css" href="../css/index.css">
    <link rel="stylesheet" type="text/css" href="../js/swiper/swiper.min.css">
    <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="../js/vue.js"></script>
    <script type="text/javascript" src="../js/filter.js"></script>
    <script type="text/javascript" src="../js/config.js"></script>
    <script type="text/javascript" src="../js/index.js"></script>
    <style type="text/css">
      
    </style>
  </head>
  <body>
    <div id="shopHome">
      <div class="deital-title">{{res.carTitle}}</div>

      <div class="detial-panel">
        <div class="title">基本参数</div>
        <div class="config-item">
          <div class="config-item-name">厂商</div>
          <div class="config-item-value">{{res.model.modelManufacturer}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">级别</div>
          <div class="config-item-value">{{res.carType.carTypeName}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">发动机</div>
          <div class="config-item-value">{{res.model.modelEngineModel}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">变速箱</div>
          <div class="config-item-value">{{res.model.modelGearbox}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">车身结构</div>
          <div class="config-item-value">{{res.model.modelBodywork}}</div>
        </div>
      </div>
      <div class="detial-panel">
        <div class="title">车身</div>
        <div class="config-item">
          <div class="config-item-name">长度(mm)</div>
          <div class="config-item-value">{{res.model.modelLength}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">宽度(mm)</div>
          <div class="config-item-value">{{res.model.modelWidth}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">高度(mm)</div>
          <div class="config-item-value">{{res.model.modelHeight}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">轴距(mm)</div>
          <div class="config-item-value">{{res.model.modelWheelbase}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">车身结构</div>
          <div class="config-item-value">{{res.model.modelBody}}</div>
        </div>
      </div>
      <div class="detial-panel">
        <div class="title">发动机</div>
        <div class="config-item">
          <div class="config-item-name">发动机型号</div>
          <div class="config-item-value">{{res.model.modelEngineModel}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">排量(mL)</div>
          <div class="config-item-value">{{res.model.modelDisplacement}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">进气形式</div>
          <div class="config-item-value">{{res.model.modelInletModel}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">气缸排列形式</div>
          <div class="config-item-value">{{res.model.modelCylinderArray}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">气缸数(个)</div>
          <div class="config-item-value">{{res.model.modelCylinderNum}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">燃料形式</div>
          <div class="config-item-value">{{res.model.modelFuelRoz}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">环保标准</div>
          <div class="config-item-value">{{res.model.modelEnviron}}</div>
        </div>
      </div>
      <div class="detial-panel">
        <div class="title">变速箱</div>
        <div class="config-item">
          <div class="config-item-name">变速箱类型</div>
          <div class="config-item-value">{{res.model.modelGearbox}}</div>
        </div>
        <div class="config-item">
          <div class="config-item-name">挡位个数</div>
          <div class="config-item-value">{{res.model.modelGearNum}}</div>
        </div>
      </div>
      <div class="detial-panel" v-for="carConf in configList">
        <div class="title">{{carConf.confName}}</div>
        <div class="config-item" v-for="childCarConfItem in carConf.childCarConf">
          <div class="config-item-name">{{childCarConfItem.confName}}</div>
          <div class="config-item-value"><span v-if="childCarConfItem.selectedState">有</span><span v-else="childCarConfItem.selectedState">无</span></div>
        </div>
      </div>
<!--       <div class="footer">
        <a v-bind:href="'home.html'+params" class="footer-nav footer-home">首页</a>
        <a v-bind:href="'cars_list.html'+params" class="footer-nav footer-cars on">买车</a>
        <a v-bind:href="'contact.html'+params" class="footer-nav footer-contact">联系</a>
      </div> -->
   </div>
      
    
  </body>
 <script type="text/javascript" src="../js/swiper/swiper.min.js"></script>
  <script type="text/javascript">
    document.documentElement.style.fontSize=document.documentElement.clientWidth/37.5+'px';


    var shopHome = new Vue({
      el:'#shopHome',
      data: {
        res:{},
        configList:[],
        imgUrl:imgUrl,
        marketId:marketId,
        shopId:shopId,
        carId:carId,
        params:'?marketId='+marketId+'&shopId='+shopId+'&imgUrl='+imgUrl+'&customerShopId='+customerShopId,
      },
      methods: {
         
      },
    });

    $.ajax({
      type: "get",      //data 传送数据类型。post 传递
      dataType: 'json',  // 返回数据的数据类型json
      url: defaultUrl+"/controller/getCarById",  // yii 控制器/方法
      cache: false, 
      data: {'carId': carId,'imageViewId':2},  //传送的数据     
      error:function(){
        alert("数据传输错误");
      },success: function (data) {
        console.log(data);
        if (data.code != 1) {
          return false
        }
        shopHome.res = data.result;
      } 
    });


    $.ajax({
      type: "get",      //data 传送数据类型。post 传递
      dataType: 'json',  // 返回数据的数据类型json
      url: defaultUrl+"/controller/getCarConfById",  // yii 控制器/方法
      cache: false, 
      data: {'carId': carId},  //传送的数据     
      error:function(){
        alert("数据传输错误");
      },success: function (data) {
        console.log(data);
        if (data.code != 1) {
          return false
        }
        shopHome.configList = data.result;
        // pricetag.res = data.result;
      } 
    });

    // $.ajax({
    //   type: "get",      //data 传送数据类型。post 传递
    //   dataType: 'json',  // 返回数据的数据类型json
    //   url: defaultUrl+"/controller/getCarConfById",  // yii 控制器/方法
    //   cache: false,      
    //   data: {'carId': carId},  //传送的数据
    //   error:function(){
    //      alert("数据传输错误");
    //   },success: function (data) {
    //     console.log(data);
    //      if (data.code != 1) {
    //       return false
    //      }
    //      for (var i = 0; i < data.result.length; i++) {
    //         for (var j = 0; j < data.result[i].childCarConf.length; j++) {
    //           if (data.result[i].childCarConf[j].selectedState) {
    //             pricetag.carConfList.push(data.result[i].childCarConf[j].confName);
    //           }
    //           if (pricetag.carConfList.length>0) {
    //             pricetag.carConfListBoolean = true;
    //           }else{
    //             pricetag.carConfListBoolean = false;
    //           }
    //         }
    //      }
    //   }
    // });







  </script>
</html>


































